<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------



//Route::domain('it','backstage'); //绑定域名

//Route::domain('backstage',function(){

//后台
Route::group('backstage', function () {

    Route::rule('login', 'Index/login');//登录
    Route::rule('verify', 'Index/verify');//验证码
    Route::get('test','Index/test');

    Route::group('', function(){  //登录中间件
        Route::rule('', 'Index/index');
        Route::rule('index', 'Index/index');
        Route::rule('welcome', 'Index/welcome');
        Route::rule('unicode', 'Index/unicode');
        Route::get('service','index/service');

        Route::group('', function(){  //权限中间件

            Route::resource('auth','Auth');  //权限管理
            Route::post('auth/delete_all','Auth/deleteAll');

            Route::resource('role','Role');  //角色管理
            Route::post('role/delete_all','role/deleteAll');

            Route::resource('admin','Admin');  //管理员管理
            Route::post('admin/delete_all','admin/deleteAll');
            Route::post('admin/change_status','admin/change_status');
            Route::get('admin/recycle','admin/recycle'); //回收站
            Route::post('admin/restore','admin/retore'); //还原


            Route::get('resource/image_folder','Resource/image_folder');  //图片文件夹页面
            Route::get('resource/folder_list','Resource/folder_list');    //获取文件夹列表
            Route::rule('resource/create_folder/:folder_type','Resource/create_folder');  //创建文件夹
            Route::rule('resource/update_folder_name','Resource/update_folder_name');  //修改文件夹名称
            Route::rule('resource/delete_folder','Resource/delete_folder');  //删除文件夹
            Route::rule('resource/upload_image','Resource/upload_image');  //上传图片
            Route::rule('resource/upload_image_all','Resource/upload_image_all');  //批量上传图片
            Route::get('resource/image_list','Resource/image_list');  //图片列表
            Route::get('resource/image_select_list','Resource/image_select_list');  //图片列表
            Route::rule('resource/delete','Resource/delete');  //删除
            Route::rule('resource/delete_all','Resource/delete_all');  //批量删除

            Route::resource('region','Region');
            Route::resource('movietype','Movietype');


        })->middleware('CheckAuth');
    })->middleware('CheckLogin');

})->prefix('backstage/');

//});


//前台
Route::get('new','Index/todayUpdate');
Route::get('details','Index/details');
Route::get('play','Index/play');
Route::get('movie','Index/movie');
Route::get('test','Index/test');
Route::rule('search','Index/search');



